package com.sinven.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * NideshopUser entity. @author MyEclipse Persistence Tools
 */
/**
 * 李志伟
 * 反向生成
 */
@Entity
@Table(name = "nideshop_user", catalog = "csf", uniqueConstraints = @UniqueConstraint(columnNames = "username"))
public class User implements java.io.Serializable {

    // Fields


    private Integer id;
    private String username;
    private String password;
    private Boolean gender;
    private Timestamp birthday;
    private Timestamp registerTime;
    private Timestamp lastLoginTime;
    private Short userLevelId;
    private String nickname;
    private String mobile;
    private String registerIp;
    private String weixinOpenid;

    // Constructors

    /** default constructor */
    public User() {
    }

    /** minimal constructor */
    public User(String username) {
        this.username = username;
    }

    /** full constructor */
    public User(String username, String password, Boolean gender,
                        Timestamp birthday, Timestamp registerTime,
                        Timestamp lastLoginTime, Short userLevelId, String nickname,
                        String mobile, String registerIp, String weixinOpenid) {
        this.username = username;
        this.password = password;
        this.gender = gender;
        this.birthday = birthday;
        this.registerTime = registerTime;
        this.lastLoginTime = lastLoginTime;
        this.userLevelId = userLevelId;
        this.nickname = nickname;
        this.mobile = mobile;
        this.registerIp = registerIp;
        this.weixinOpenid = weixinOpenid;
    }

    // Property accessors
    @Id
    @GeneratedValue
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "username", unique = true, nullable = false, length = 60)
    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Column(name = "password", length = 32)
    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "gender")
    public Boolean getGender() {
        return this.gender;
    }

    public void setGender(Boolean gender) {
        this.gender = gender;
    }

    @Column(name = "birthday", length = 0)
    public Timestamp getBirthday() {
        return this.birthday;
    }

    public void setBirthday(Timestamp birthday) {
        this.birthday = birthday;
    }




    @Column(name = "register_time", length = 0)
    public Timestamp getRegisterTime() {
        return this.registerTime;
    }

    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = registerTime;
    }

    @Column(name = "last_login_time", length = 0)
    public Timestamp getLastLoginTime() {
        return this.lastLoginTime;
    }

    public void setLastLoginTime(Timestamp lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    @Column(name = "user_level_id")
    public Short getUserLevelId() {
        return this.userLevelId;
    }

    public void setUserLevelId(Short userLevelId) {
        this.userLevelId = userLevelId;
    }

    @Column(name = "nickname", length = 60)
    public String getNickname() {
        return this.nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    @Column(name = "mobile", length = 20)
    public String getMobile() {
        return this.mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Column(name = "register_ip", length = 45)
    public String getRegisterIp() {
        return this.registerIp;
    }

    public void setRegisterIp(String registerIp) {
        this.registerIp = registerIp;
    }

    @Column(name = "weixin_openid", length = 50)
    public String getWeixinOpenid() {
        return this.weixinOpenid;
    }

    public void setWeixinOpenid(String weixinOpenid) {
        this.weixinOpenid = weixinOpenid;
    }

}